<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>旭日图 - 按层配置样式</title>
    <!-- 引入 echarts.js -->
    <script src="cjj/echarts.js"></script>
    <!--<script src="cjj/jq.js"></script>-->
</head>
<body>
<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">


var myChart = echarts.init(document.getElementById('main'));

var option = {
    series: {
        type: 'sunburst',
        data: [
        	{
	            name: 'A',
	            value: 10,
	            children: [{
	                value: 3,
	                name: 'Aa'
	            }, {
	                value: 5,
	                name: 'Ab'
	            }]
	        }, {
	            name: 'B',
	            children: [{
	                name: 'Ba',
	                value: 4
	            }, {
	                name: 'Bb',
	                value: 2
	            }]
	        }, {
	            name: 'C',
	            value: 3
	        }
	    ],
	    levels: [
	        {
	            // 留给数据下钻点的空白配置
	        },{
	            // 最靠内测的第一层
	            itemStyle: {
	                color: 'red'
	            },
	            label: {
	                color: 'blue'
	            }
	        },{
	            // 第二层 ...
	            itemStyle: {
	                color: 'green'
	            },
	            label: {
	                color: 'yellow'
	            }
	        }
	    ]    
    }
};

myChart.setOption(option);


</script>
</body>
</html>